<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let array = ['1', '-100', '34', '145', '1000']

        let array1 = array.map(it => {
            return parseInt(it) + 100
        })

        console.log(array1)

        let res = array.reduce((pre, after) => {
            console.log('处理前==' + pre)
            console.log('处理后==' + after)
            return parseInt(pre) - parseInt(after) + 100
        })
        console.log(res)

        let res2 = array.reduce((pre, after) => {
            console.log('处理前==' + pre)
            console.log('处理后==' + after)
            return parseInt(pre) - parseInt(after) + 100
        }, 1000)
        console.log(res2)
    </script>
</body>

</html>